import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2023-07-13
 * Time: 22:32
 */
public class Test {

    public static void isDays(int year,int month,int day){
        int sum = 0;
        for (int i = 1; i < month; i++) {
            switch (i){
                case 1:
                case 3:
                case 5:
                case 7:
                case 8:
                case 10:
                case 12:
                    sum += 31;
                    break;
                case 4:
                case 6:
                case 9:
                case 11:
                    sum += 30;
                    break;
                case 2:
                    if((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0)){
                        sum += 29;
                    }else {
                        sum += 28;
                    }
            }
        }
        System.out.println(year+"年"+month+"月"+day+"日,是该年的"+(sum+day)+"天");

    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();
        int month = scanner.nextInt();
        int day = scanner.nextInt();
        isDays(year,month,day);
    }
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        char ch = str.charAt(0);
        if(ch >= 'a' && ch <= 'z'){
            ch -= 32;
        }
        System.out.println(ch);
    }
}
